/**
 *
 */
package gemini.basic.dao.impl;

import gemini.basic.dao.BillDetailDao;
import gemini.basic.dao.GmnDao;
import gemini.basic.model.BillDetail;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

/**
 *
 *
 */
public class BillDetailDaoImpl extends HibernateDaoSupport implements BillDetailDao {

	private GmnDao gmnDao;

	public void setGmnDao(GmnDao gmnDao) {
		this.gmnDao = gmnDao;
	}

	@Override
	public BillDetail saveOrUpdate(BillDetail billDetail, boolean flush) {
		BillDetail result = null;
		if (flush) {
			result = (BillDetail) gmnDao.saveOrUpdateAndFlush(billDetail);
		} else {
			result = (BillDetail) gmnDao.saveOrUpdate(billDetail);
		}
		return result;
	}

}
